今晚來說Kubernetes的監控主角:Prometheus
我是透過 HELM Stable repo 中安裝stable/prometheus-operator
有關安裝方式,可參考此篇內容。
HELM repo list
$ helm repo list
NAME    	URL
stable  	https://kubernetes-charts.storage.googleapis.com
Metric資料名稱與key/values來呈現。PromQL查詢語言,取得時序資料。HTTP協定pull模式收集時序資料。PushGateway角色,支持推送時序資料。Targets。PromQL語言支援資料查詢。Prometheus 來 Pull 時就消失,因此透過一個PushGateway來推送。適合用於服務層面的 Metrics。Exporter,用來曝露該應用程式的Metric給 Prometheus Server,即以 Client Library 開發的 HTTP server。縱多的官方、第三方exporter可參考官方 Exporters and integrations。Prometheus Server的Alert event,並可整合第三方、自訂的告警模式來發送警報,例如:Slack、E-mail、與其他 Webhook 等等。
ServiceDiscovery、PushGateway、Exporter。TSDB。http服務,可讓支援PromQL的查詢者取得所需的時序資料。PromQL語言查詢時序資料,並且繪製圖表。